﻿using LazyLib.Wow;

namespace Frosty.Helpers
{
    public class Runes
    {
        protected static int BloodRuneAvailable;
        protected static int FrostRuneAvailable;
        protected static int UnholyRuneAvailable;

        /// <summary>
        /// Checks the runes.
        /// </summary>
        public static void CheckRunes()
        {
            BloodRuneAvailable = 2;
            FrostRuneAvailable = 2;
            UnholyRuneAvailable = 2;

            if (!ObjectManager.MyPlayer.BloodRune1Ready)
                BloodRuneAvailable--;

            if (!ObjectManager.MyPlayer.BloodRune2Ready)
                BloodRuneAvailable--;

            if (!ObjectManager.MyPlayer.FrostRune1Ready)
                FrostRuneAvailable--;

            if (!ObjectManager.MyPlayer.FrostRune2Ready)
                FrostRuneAvailable--;

            if (!ObjectManager.MyPlayer.UnholyRune1Ready)
                UnholyRuneAvailable--;

            if (!ObjectManager.MyPlayer.UnholyRune2Ready)
                UnholyRuneAvailable--;
        }

        public static bool BloodAvail()
        {
            return BloodRuneAvailable > 0 ? true : false;
        }

        public static bool UnholyAvail()
        {
            return UnholyRuneAvailable > 0 ? true : false;
        }

        public static bool FrostAvail()
        {
            return FrostRuneAvailable > 0 ? true : false;
        }
    }
}
